import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import '@/content/element-plus.scss'
import Content from '@/content/content.vue'

const crxApp = document.createElement('div')
crxApp.id = 'CRX-container'
document.body.appendChild(crxApp)

const app = createApp(Content)
app.use(ElementPlus)
app.mount('#CRX-container')

try {
  let insertScript = document.createElement('script')
  insertScript.setAttribute('type', 'text/javascript')
  insertScript.src = chrome.runtime.getURL('insert.js')
  document.body.appendChild(insertScript)
} catch (e) {}
